]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Move the notification actor out of the tray
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 13 Mar 2013 20:15:28 +0000 (16:15 -0400)
committerJasper St. Pierre <jstpierre@mecheye.net>
Fri, 19 Apr 2013 17:38:41 +0000 (13:38 -0400)
Putting the notification actor in the tray actor has caused a lot
of various bugs and glitches over the years related to syncing the
two, fizzling out events, and so on. It's a much simpler model if
we consider the notification actor and tray to be separate widgets.

As a side effect, this makes the context menu not pop up when we
right-click on notifications.

https://bugzilla.gnome.org/show_bug.cgi?id=695800

js/ui/messageTray.js

index 543389435fec9bb0a2000daed83ac832a9465c55..49c8037ab65af25fd3758700b12f1f5abf4ca6bc 100644 (file)
@@ -1573,7 +1573,6 @@ const MessageTray = new Lang.Class({
                                                    layout_manager: new Clutter.BinLayout() });
         this._notificationWidget.connect('key-release-event', Lang.bind(this, this._onNotificationKeyRelease));
         this._notificationWidget.connect('notify::hover', Lang.bind(this, this._onNotificationHoverChanged));
-        this.actor.add_actor(this._notificationWidget);
 
         this._notificationBin = new St.Bin({ y_expand: true });
         this._notificationBin.set_y_align(Clutter.ActorAlign.START);
@@ -1628,6 +1627,7 @@ const MessageTray = new Lang.Class({
                                                      { keybindingMode: Shell.KeyBindingMode.MESSAGE_TRAY });
         this._grabHelper.addActor(this._summaryBoxPointer.actor);
         this._grabHelper.addActor(this.actor);
+        this._grabHelper.addActor(this._notificationWidget);
 
         Main.layoutManager.connect('keyboard-visible-changed', Lang.bind(this, this._onKeyboardVisibleChanged));
 
@@ -1669,6 +1669,7 @@ const MessageTray = new Lang.Class({
                                                });
 
         Main.layoutManager.trayBox.add_actor(this.actor);
+        Main.layoutManager.trayBox.add_actor(this._notificationWidget);
         Main.layoutManager.trackChrome(this.actor);
         Main.layoutManager.trackChrome(this._notificationWidget);
         Main.layoutManager.trackChrome(this._closeButton);